<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        .box {
            width: 600px;
            height: 600px;
            border: 3px solid blue;
        }

        .inner {
            width: 50px;
            height: 50px;
            background: pink;
            transition: 2s;
        }

        .box:hover .inner {
            /* transform: translateX(300px); */
            /* transform: translateY(400px); */
            transform: translate(300px, 300px);
        }
    </style>
</head>

<body>
    位移:transform: translate(x轴,y轴)
    x轴位移：transform: translateX
    y轴位移：transform: translateY

    <div class="box">
        <div class="inner"></div>
    </div>
</body>

</html>